import request from "@/utils/request";

// 获取列表
export function getAllList(query) {
    return request({
        url: "/earthquakeDisaster/getPage",
        method: "get",
        params: query,
    });
}

// 查询信息
export function detail(id) {
    return request({
      url: `/earthquakeDisaster/findById?id=` + id,
      method: "get",
    });
}

// 编辑
export function update(data) {
    return request({
        url: '/earthquakeDisaster/updateById',
        method: 'post',
        data:data
    })
}

// 删除
export function delData(id) {
    return request({
        url: `/earthquakeDisaster/delete/${id}`,
        method: 'post'
    })
}

// 发布
export function releaseData(data) {
    return request({
        url: `/earthquakeDisaster/release/${data}`,
        method: 'post',
    })
}

// 撤回
export function withdrawData(data) {
    return request({
        url: `/earthquakeDisaster/withdraw/${data}`,
        method: 'post',
    })
}